<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCrawlRecord extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('crawl_record', function (Blueprint $table) {
            $table->increments('crawl_id');
            $table->unsignedInteger('site_id')->comment('站点ID');
            $table->string('crawl_url', 500)->comment('抓取链接');
            $table->text('crawl_content')->comment('抓取内容');
            $table->boolean('crawl_status')->default(0)->comment('抓取状态，0失败，1成功');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('crawl_record');
    }
}
